home *** CD-ROM | disk | FTP | other *** search
- %case window field%
- ListHandle %HandleName%;
- short %fieldname%;
- %case winAuxiliaryProto%
- static void Build%itemname% (void);
- %case winAuxiliary%
- /*----------*/
- static void Build%itemname% ()
- {
- Rect bounds;
-
- SetWFont (%itemname%);
- GetWRect (%itemname%, &bounds);
- cur->%HandleName% = NewV1List (bounds, qd.thePort);
- AddToList ("\pOne", cur->%HandleName%);
- AddToList ("\pTwo", cur->%HandleName%);
- AddToList ("\pThree", cur->%HandleName%);
- AddToList ("\pInfinity", cur->%HandleName%);
- LDoDraw (true, cur->%HandleName%);
-
- } /*Build%Itemname%*/
-
- %case create%
- Build%itemname% ();
- %case dispose%
- LDispose (cur->%HandleName%);
- %case mousein%
- if (PtInRect (where, &(**(cur->%HandleName%)).rView)) {
- if (LClick (where, modifiers, cur->%HandleName%)) {
- /*double click*/
- }
- if (GetListChoice (&cur->%fieldname%, cur->%HandleName%)) {
- /* something is selected */
- }
- }
- %case update%
- SetWFont (%itemname%);
- LUpdate (qd.thePort->visRgn, cur->%HandleName%);
- bounds = (**(cur->%HandleName%)).rView;
- InsetRect (&bounds, -1, -1);
- FrameRect (&bounds);
- %case activate%
- LActivate (activate, cur->%HandleName%);
- %case track%
- if ((whichControl == (**(cur->%HandleName%)).vScroll)
- || (whichControl == (**(cur->%HandleName%)).hScroll)) {
- if (LClick (where, 0, cur->%HandleName%)) {
- /*double click in scroll bar*/
- }
- }
- %case itemNr%
- %DefineItem%
- %case dialog field%
- short %fieldname%;
- %haveField%
- %case init field%
- info->%fieldname% = -1;
- %case auxiliaryProto%
- static void Build%itemname% (void);
- static pascal void Draw%itemname%% %(DialogPtr whichDialog,
- short itemNr);
- %case auxiliary%
- %needsFilter%
- /*----------*/
- static ListHandle %itemname%Handle;
-
- /*----------*/
- static void Build%itemname% ()
- {
- %itemname%Handle = Vert1List (%itemname%);
- AddToList ("\pOne", %itemname%Handle);
- AddToList ("\pTwo", %itemname%Handle);
- AddToList ("\pThree", %itemname%Handle);
- AddToList ("\pInfinity", %itemname%Handle);
- LDoDraw (true, %itemname%Handle);
-
- } /*Build%Itemname%*/
-
- /*----------*/
- static pascal void Draw%itemname%% %(DialogPtr whichDialog,
- short itemNr)
- {
- %if lang = MPW%
- #pragma unused (whichDialog, itemNr)
-
- %endif%
- DrawList (%itemname%Handle);
- } /*Draw%itemname%*/
-
- %case filter%
- if (!filtered) {
- filtered = FilterList (event, %itemname%Handle, %itemname%, %itemname%, itemHit);
- }
- %case set%
- Build%itemname% ();
- %if lang = AUX%
- SetUserItem (%itemname%, (ProcPtr) Draw%itemname%);
- %else%
- SetUserItem (%itemname%, (ProcPtr) &Draw%itemname%);
- %endif%
- SetListChoice (info->%fieldname%, %itemname%Handle);
- %case hit%
- case %itemname%:
- if (GetListChoice (&info->%fieldname%, %itemname%Handle)) {
- /* something is selected */
- }
- break;
- %case finish%
- LDispose (%itemname%Handle);
-